package com.scaffold.controller.impl;

import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Da Shuai
 * @since 2021-08-17 11:49:10
 */
@Controller
public class TestController {

    @GetMapping("/probe")
    @ResponseBody
    public String probe() {
        return "success";
    }

    /**
     * 重定向到swagger页面
     *
     * @return String
     */
    @ApiOperation(hidden = true, value = "重定向到swagger页面")
    @GetMapping("/")
    public String redirect() {
        return "redirect:/swagger-ui.html";
    }
}
